Skip to content

Move std::io::Write to core::io#158541

Open
bushrat011899 wants to merge 8 commits into
rust-lang:mainfrom
bushrat011899:core_io_write
Open

Move std::io::Write to core::io#158541
bushrat011899 wants to merge 8 commits into
rust-lang:mainfrom
bushrat011899:core_io_write

Conversation

@bushrat011899

@bushrat011899 bushrat011899 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

View all comments

ACP: rust-lang/libs-team#755
Tracking issue: #154046
Split From: #156527
Blocked On: #158537
Blocked On: #158540

Description

Moves std::io::Write to core::io. This is effectively a direct cut and paste, but with a large diff due to how many implementations need to be moved into alloc and core. Blocked on #158537 and #158540.


Notes

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 29, 2026
@rustbot

rustbot commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

r? @Darksonn

rustbot has assigned @Darksonn.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 13 candidates
  • Random selection from 6 candidates

@bushrat011899

Copy link
Copy Markdown
Contributor Author

@rustbot blocked

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 29, 2026
@bushrat011899 bushrat011899 force-pushed the core_io_write branch 2 times, most recently from ec21a69 to c806329 Compare July 3, 2026 01:49
@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@bushrat011899

Copy link
Copy Markdown
Contributor Author

@rustbot ready
@clarfonthey This is the next PR in my chain if you're interested in reviewing this one too! I'm not assigning you just in case you don't want to take it on.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Jul 6, 2026
@clarfonthey

Copy link
Copy Markdown
Contributor

r? clarfonthey

@rustbot rustbot assigned clarfonthey and unassigned Darksonn Jul 7, 2026
Comment thread library/core/src/io/write.rs
Comment thread library/core/src/io/cursor.rs Outdated
@bushrat011899 bushrat011899 requested a review from clarfonthey July 7, 2026 01:25
Comment thread library/alloc/src/io/impls.rs Outdated
@rust-bors rust-bors Bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 8, 2026
@rust-bors

rust-bors Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

This PR was contained in a rollup (#158941), which was unapproved.

View changes since this unapproval

@bushrat011899 bushrat011899 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rustbot author
Need to fix this sometimes-used import, unfortunately it picked up in normal CI.

View changes since this review

Comment thread library/std/src/io/mod.rs Outdated
@rustbot

rustbot commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

bushrat011899 and others added 8 commits July 8, 2026 18:38
Co-Authored-By: Clar Fon <15850505+clarfonthey@users.noreply.github.com>
Co-Authored-By: Clar Fon <15850505+clarfonthey@users.noreply.github.com>
Moves unsafe code from `alloc::io` into `alloc::vec`. A more general `try_extend_from_slice` may be useful in the future, but that requires changing how specialization is done for `SpecExtend` and that's a lot for an internal-only function.
@rustbot

rustbot commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@bushrat011899

Copy link
Copy Markdown
Contributor Author

@rustbot ready

A handful of pub(crate) functions that were previously always used in std become conditionally used once Read/Write/etc. are moved to core/alloc. I've marked those functions as #[allow(unused_imports)] to avoid changing the various callsites or adding a brittle cfg(...) to their reexport.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 8, 2026
@bushrat011899

Copy link
Copy Markdown
Contributor Author

auto - dist-various-2 was the CI task that failed during the merge. So it might be worth a "bors try dist-various-2"?

@clarfonthey

Copy link
Copy Markdown
Contributor

@bors try jobs=dist-various-2

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 8, 2026
Move `std::io::Write` to `core::io`


try-job: dist-various-2
@rust-bors

rust-bors Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: f09a32d (f09a32d2764485e529832b5fd3cb8c1d59e99bd9)
Base parent: c290daa (c290daa1e5274a52e54a0f49e31bd70192abc606)

@clarfonthey

Copy link
Copy Markdown
Contributor

@bors r+ rollup=iffy

For previous reasons of modifying a lot of I/O code and also having failed once, despite passing try now.

@rust-bors

rust-bors Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

📌 Commit cb09bff has been approved by clarfonthey

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 8, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 8, 2026
…rfonthey

Move `std::io::Write` to `core::io`

ACP: rust-lang/libs-team#755
Tracking issue: rust-lang#154046
Split From: rust-lang#156527
~~Blocked On: rust-lang#158537
~~Blocked On: rust-lang#158540

## Description

Moves `std::io::Write` to `core::io`. This is effectively a direct cut and paste, but with a large diff due to how many implementations need to be moved into `alloc` and `core`. Blocked on rust-lang#158537 and rust-lang#158540.

---

## Notes

* No AI tooling of any kind was used during the creation of this PR.
* Please see rust-lang#154046 (comment) for a review order and broader context for this PR.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 8, 2026
…rfonthey

Move `std::io::Write` to `core::io`

ACP: rust-lang/libs-team#755
Tracking issue: rust-lang#154046
Split From: rust-lang#156527
~~Blocked On: rust-lang#158537
~~Blocked On: rust-lang#158540

## Description

Moves `std::io::Write` to `core::io`. This is effectively a direct cut and paste, but with a large diff due to how many implementations need to be moved into `alloc` and `core`. Blocked on rust-lang#158537 and rust-lang#158540.

---

## Notes

* No AI tooling of any kind was used during the creation of this PR.
* Please see rust-lang#154046 (comment) for a review order and broader context for this PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants